country_decisions = {

	found_european_union = {
		major = yes
		potential = {
			NOT = { any_country = { has_country_modifier = european_union } }
			NOT = { hre_size = 1 }
			NOT = { has_global_flag = eu_dismantled }
			capital_scope = { continent = europe }
			dip_tech = 83
			NOT = { exists = EUR }
		}
		allow = {
			is_at_war = no
			is_subject = no
			adm_power = 150
			dip_power = 150
			mil_power = 150
			dip_tech = 88
			stability = 2
			OR = {
				85 = { owned_by = ROOT }
				92 = { owned_by = ROOT }
				94 = { owned_by = ROOT }
				97 = { owned_by = ROOT }
				118 = { owned_by = ROOT }
				183 = { owned_by = ROOT }
			}
			OR = {
				government = parliamentary_republic
				government = presidental_republic
				government = parliamentary_monarchy
				government = constitutional_monarchy
				government = constitutional_republic
				government = plutocratic_republic
			}
		}
		effect = {
			every_owned_province = { set_in_empire = yes }
			elector = yes
			add_country_modifier = {
				name = european_union
				duration = -1
			}
			add_country_modifier = {
				name = european_leader
				duration = -1
			}
			every_ally = {
				limit = {
					ai = yes
					OR = {
						government = parliamentary_republic
						government = presidental_republic
						government = parliamentary_monarchy
						government = constitutional_monarchy
						government = constitutional_republic
						government = plutocratic_republic
					}
					capital_scope = { continent = europe }
				}
				add_country_modifier = {
					name = european_union
					duration = -1
				}
				every_owned_province = { set_in_empire = yes }
			}
			every_country = {
				limit = { ai = no }
				country_event = { id = european_union.12 }
			}
			internal_hre_cb = no
		}
		ai_will_do = {
			factor = 1
		}
		ai_importance = 400
	}

	join_european_union = {
		major = yes
		potential = {
			any_country = { has_country_modifier = european_union }
			NOT = { has_country_modifier = european_union }
			capital_scope = { continent = europe }
			NOT = { has_global_flag = centralized_warfare_policy_enacted }
		}
		allow = {
			is_at_war = no
			is_subject = no
			adm_power = 150
			dip_power = 150
			mil_power = 150
			stability = 1
			OR = {
				government = parliamentary_republic
				government = presidental_republic
				government = parliamentary_monarchy
				government = plutocratic_republic
			}
		}
		effect = {
			add_adm_power = -150
			add_dip_power = -150
			add_mil_power = -150
			add_country_modifier = {
				name = european_union
				duration = -1
			}
			hidden_effect = {
				every_owned_province = { set_in_empire = yes }
				every_country = {
					limit = { ai = no }
					country_event = { id = european_union.3 }
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				tag = SWI
				NOT = { inflation = 1 }
			}
			modifier = {
				factor = 0
				calc_true_if = {
					all_owned_province = {
						NOT = { continent = europe }
					}
					amount = 10
				}
			}
			modifier = {
				factor = 0
				NOT = {
					OR = {
						capital_scope = { continent = europe }
						capital_scope = { continent = asia }
						capital_scope = { continent = africa }
					}
				}
			}
			modifier = {
				factor = 0
				is_neighbor_of = SOV
			}
		}
		ai_importance = 400
	}
	
	leave_european_union = {
		major = yes
		potential = {
			any_country = { has_country_modifier = european_union }
			has_country_modifier = european_union
			NOT = { has_global_flag = centralized_warfare_policy_enacted }
			NOT = { has_global_flag = eu_debate_happening }
			OR = {
				is_subject = no
				overlord = { NOT = { has_country_modifier = european_union } }
			}
		}
		allow = {
			is_at_war = no
			stability = 1
		}
		effect = {
			add_stability = -1
			remove_country_modifier = european_union
			hidden_effect = {
				every_owned_province = {
					limit = { is_core = ROOT }
					set_in_empire = no
				}
			}
			set_government_rank = 2
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				is_subject = no
				OR = {
					government = parliamentary_republic
					government = presidental_republic
					government = parliamentary_monarchy
					government = constitutional_monarchy
					government = constitutional_republic
					government = plutocratic_republic
				}
			}
		}
	}
	
	dismantle_european_union = {
		major = yes
		potential = {
			any_country = { has_country_modifier = european_union }
			NOT = { has_country_modifier = european_union }
		}
		allow = {
			85 = { controlled_by = ROOT }
			92 = { controlled_by = ROOT }
			94 = { controlled_by = ROOT }
			97 = { controlled_by = ROOT }
			118 = { controlled_by = ROOT }
			183 = { controlled_by = ROOT }
		}
		effect = {
			add_prestige = 100
			set_global_flag = eu_dismantled
			EUR = { release_all_subjects = yes }
			every_country = { remove_country_modifier = european_union }
			hidden_effect = {
				3148 = { 
					cede_province = XXX
					remove_core = EUR
				}
			}
		}
		ai_will_do = {
			factor = 1
		}
		ai_importance = 400
	}
	
	adopt_the_euro = {
		potential = {
			is_year = 1999
			has_country_modifier = european_union
			NOT = { has_country_modifier = monetary_union }
		}
		allow = {
			monthly_income = 5
			adm_power = 50
		}
		effect = {
			add_adm_power = -50
			add_country_modifier = {
				name = monetary_union
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				tag = DAN
				NOT = { inflation = 1 }
			}
			modifier = {
				factor = 0
				tag = GBR
				NOT = { inflation = 1 }
			}
		}
		ai_importance = 400
	}

	unite_european_union = {
		major = yes
		potential = {
			has_country_modifier = european_leader
			NOT = { has_global_flag = eu_debate_happening }
			has_global_flag = centralized_warfare_policy_enacted
		}
		allow = {
			stability = 3
			treasury = 15000
			is_at_war = no
		}
		effect = {
			set_global_flag = final_eu_debate
			set_global_flag = eu_debate_happening
			country_event = { id = european_union.2 }
			add_treasury = -15000
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	eu_integration_1 = {
		major = yes
		potential = {
			NOT = { has_global_flag = take_over_parliament }
			NOT = { has_global_flag = eu_debate_happening }
			has_country_modifier = european_leader
		}
		allow = {
			adm_power = 250
			dip_power = 250
			mil_power = 250
			check_variable = { which = eu_authority value = 50 }
		}
		effect = {
			add_adm_power = -250
			add_dip_power = -250
			add_mil_power = -250
			set_global_flag = take_over_parliament
			set_global_flag = eu_debate_happening
			country_event = { id = european_union.2 }
			set_variable = { which = eu_authority value = 0 }
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	eu_integration_2 = {
		major = yes
		potential = {
			has_global_flag = take_over_parliament
			NOT = { has_global_flag = take_over_commission }
			NOT = { has_global_flag = eu_debate_happening }
			has_country_modifier = european_leader
		}
		allow = {
			adm_power = 250
			dip_power = 250
			mil_power = 250
			check_variable = { which = eu_authority value = 50 }
		}
		effect = {
			add_adm_power = -250
			add_dip_power = -250
			add_mil_power = -250
			set_global_flag = take_over_commission
			set_global_flag = eu_debate_happening
			country_event = { id = european_union.2 }
			set_variable = { which = eu_authority value = 0 }
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	eu_integration_3 = {
		major = yes
		potential = {
			has_global_flag = take_over_parliament
			has_global_flag = take_over_commission
			NOT = { has_global_flag = take_over_council }
			NOT = { has_global_flag = eu_debate_happening }
			has_country_modifier = european_leader
		}
		allow = {
			adm_power = 250
			dip_power = 250
			mil_power = 250
			check_variable = { which = eu_authority value = 50 }
		}
		effect = {
			add_adm_power = -250
			add_dip_power = -250
			add_mil_power = -250
			set_global_flag = take_over_council
			set_global_flag = eu_debate_happening
			country_event = { id = european_union.2 }
			set_variable = { which = eu_authority value = 0 }
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	centralized_warfare_policy = {
		major = yes
		potential = {
			has_country_modifier = european_leader
			NOT = { has_global_flag = eu_debate_happening }
			NOT = { has_global_flag = centralized_warfare_policy_enacted }
			has_global_flag = take_over_council
		}
		allow = {
			treasury = 5000
			check_variable = { which = eu_authority value = 50 }
		}
		effect = {
			add_treasury = -5000
			set_global_flag = centralized_warfare_policy_enacted
			set_global_flag = eu_debate_happening
			country_event = { id = european_union.2 }
			set_variable = { which = eu_authority value = 0 }
		}
	}

}